{{extend 'layout.html'}}

<br/>
<div id='main_table' style="margin-left:auto; margin-right:auto; width:80%;">
	<table style="border:2px;width:80%;">
		<thead>
			<tr>
				<th style="width: 10%">
					{{=T('Code')}}
				</th>				
				<th style="width: ">
					{{=T('Description')}}
				</th>
				<th>
					{{=T('Overall Completion')}}
				</th>
			</tr>
		</thead>
		{{for i, row in enumerate(projects): }}
			{{=TR(
				TD(
					A(row.project.code, _href=URL(request.application, 'default','items', args=[row.project.code, row.language.code,]))), 
				TD(row.project.description),
				TD(
					A(DIV(
						DIV(_class='translated', _style='width:%spx;' %row.project_language.percent),
						DIV(_class='untranslated', _style='left:%spx ;width:%spx;' %(row.project_language.percent, (100-row.project_language.percent))),
						_class='graph', _dir='ltr'),
						_title=T('%s%% completed' %row.project_language.percent ))),
						_class='even' if not i%2 else 'odd')}}	
		{{pass}}
	</table>
</div>